﻿Imports System.Data
Imports System.Data.Odbc
Imports WSEntidades
Public Class LstdiarioFact
    Public Shared Function Build(ByVal dr As OdbcDataReader) As LstdiarioBE
        Dim tmpLstdiario As LstdiarioBE = New LstdiarioBE()
        Try
            With tmpLstdiario
                .Abonos = convertDTFromDb.ConvertDecimal(dr.Item("Abonos"))
                .Bene = convertDTFromDb.ConvertString(dr.Item("Bene"))
                .Cargos = convertDTFromDb.ConvertDecimal(dr.Item("Cargos"))
                .Concepto = convertDTFromDb.ConvertDecimal(dr.Item("Concepto"))
                .Docto = convertDTFromDb.ConvertString(dr.Item("Docto"))
                .Fecha = convertDTFromDb.ConvertString(dr.Item("Fecha"))
                .Id = convertDTFromDb.convertInt32(dr.Item("Id"))
                .Obs = convertDTFromDb.ConvertString(dr.Item("Obs"))
                .Saldo = convertDTFromDb.ConvertDecimal(dr.Item("Saldo"))
                .Usr = convertDTFromDb.ConvertString(dr.Item("Usr"))
            End With
            Return tmpLstdiario
        Catch ex As Exception
            Throw
        Finally
            tmpLstdiario = Nothing
        End Try
    End Function
End Class
